//
// Copyright (c) 2009 All Right Reserved
//
// vl
//
// 2009-01-01
// Contains MidiError enumeration.
using System;
using System.Runtime.Serialization;
using System.Text;
using JetBrains.Annotations;
namespace LargoCommon.Midi
{
///
/// The base class for all MIDI device exception classes.
///
[Serializable]
public class MidiDeviceException : Exception //// DeviceException
{
#region Error Codes
#endregion
#region Constructors
///
/// Initializes a new instance of the MidiDeviceException class with the
/// specified error code.
///
///
/// The error code.
///
protected MidiDeviceException(int errCode) //// : base(errCode)
{
this.ErrorCode = errCode;
}
///
/// Initializes a new instance of the MidiDeviceException class.
///
protected MidiDeviceException() {
}
///
/// Initializes a new instance of the MidiDeviceException class .
///
/// Midi message.
protected MidiDeviceException(string message)
: base(message) {
}
///
/// Initializes a new instance of the MidiDeviceException class.
///
/// Midi message.
/// Inner Exception.
protected MidiDeviceException(string message, Exception innerException)
: base(message, innerException) {
}
///
/// Initializes a new instance of the MidiDeviceException class.
///
/// Serialization Info.
/// Streaming Context.
protected MidiDeviceException(SerializationInfo info, StreamingContext context)
: base(info, context) {
}
#endregion
#region Properties
///
/// Gets Error Code.
///
/// General property.
private int ErrorCode { [UsedImplicitly] get; }
#endregion
#region String representation
/// String representation of the object.
/// Returns value.
public override string ToString() {
var s = new StringBuilder();
s.AppendFormat("ErrorCode {0}", this.ErrorCode);
return s.ToString();
}
#endregion
#region Methods
/* MidiDeviceException ?!
///
/// When overridden in a derived class, sets the with information about the exception.
///
/// The that holds the serialized object data about the exception being thrown.
/// The that contains contextual information about the source or destination.
// ReSharper disable once RedundantOverriddenMember
public override void GetObjectData(SerializationInfo info, StreamingContext context) {
base.GetObjectData(info, context);
}
*/
#endregion
}
}